<?php

/**
 * 盲盒今日收藏商品数（根据uid分别存储）
 */

use Biz\cache\brand\BlindBox;

ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);
ini_set('memory_limit', '1024M');
require_once '/data/wwwroot/g_vendor/autoload.php';
$oldKeys = BlindBox::keys("blind_box_tody_fav_wiki_*");


$redis = new \Hhz\Redis\otherRedis(\hhz\constant\redis\redisKeys::KEY_B_OTHER_BLIND_BOX_TODAY_FAV_WIKI);
$i = 1;
foreach ($oldKeys as $key) {
    $redis->set($key, BlindBox::get($key));
    $expireTime = strtotime(date('Y-m-d')) + 86400 - time();
    $redis->expire($key, $expireTime);
    echo '第'.$i.'条数据更新完成-$key-'.$key.PHP_EOL;
    $i++;
}
echo 'success'.PHP_EOL;



